﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Common/Main.Master" AutoEventWireup="true"
    CodeBehind="ItemManage.aspx.cs" Inherits="ATW.MT.BaseManage.ItemManage" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cp01" runat="server">
    <div class="main_hd">
        <h2 style="padding: 0px 20px;">
            需求子项管理
        </h2>
        <div class="title_tab" id="topTab">
            <ul>
                <li>子项名称：&nbsp;<input type="text" id="txtDiName" runat="server" />
                    &nbsp;&nbsp;&nbsp;状态：&nbsp;
                    <asp:DropDownList runat="server" ID="ddlStatus">
                        <asp:ListItem Value="" Text="全部"></asp:ListItem>
                        <asp:ListItem Value="0" Text="正常"></asp:ListItem>
                        <asp:ListItem Value="2" Text="删除"></asp:ListItem>
                    </asp:DropDownList>
                    &nbsp; &nbsp;
                    <asp:Button runat="server" ID="btnSearch" Text="搜索" class="MaintenanceButton" OnClick="btnSearch_Click"
                        Style="background: #d91913; outline: none; border: none; color: White; padding: 5px 20px;
                        text-indent: 0px" />
                    &nbsp; &nbsp; &nbsp;
                    <input type="button" id="btnAddItem" style="width: 68px" class="queryButton" value="新增" />
                </li>
            </ul>
            <ul>
                <li>
                    <asp:Label runat="server" ID="lblError" ForeColor="Red" Font-Bold="true"></asp:Label></li>
            </ul>
        </div>
        <asp:Repeater ID="rpList" runat="server">
            <HeaderTemplate>
                <table width="95%" border="0" cellpadding="0" cellspacing="0" style="font-size: 14px"
                    class="queryResultTable">
                    <tr>
                        <th>
                            所属类别
                        </th>
                        <th>
                            子项名称
                        </th>
                        <th>
                            子项描述
                        </th>
                        <th>
                            子项单位
                        </th>
                        <th>
                            子项等级
                        </th>
                        <th>
                            子项状态
                        </th>
                        <th>
                            操作
                        </th>
                    </tr>
            </HeaderTemplate>
            <ItemTemplate>
                <tr>
                    <td>
                        <%#Eval("ticName").ToString() %>
                    </td>
                    <td>
                        <%#Eval("diName").ToString()%>
                    </td>
                    <td>
                        <%#Eval("diDesc").ToString()%>
                    </td>
                    <td>
                        <%#Eval("diUnit").ToString()%>
                    </td>
                    <td>
                        <%#Eval("Level").ToString() %>
                    </td>
                    <td>
                        <%#Eval("diRowStatus").ToString() == "0" ? "正常" : Eval("diRowStatus").ToString()=="2"?"删除":"正常"%>
                    </td>
                    <td>
                        <asp:LinkButton runat="server" ID="lbnModify" OnClick="lbnModify_Click" CommandArgument='<%#Eval("DIID").ToString() %>'>
                            修改
                        </asp:LinkButton>
                        <asp:LinkButton runat="server" ID="lbnDelete" OnClick="lbnDelete_Click" Visible='<%#Eval("diRowStatus").ToString()=="0"?true:false %>'
                            CommandArgument='<%#Eval("DIID").ToString() %>' OnClientClick="return confirm('您确定要删除该子项么？')">
                            删除
                        </asp:LinkButton>
                        <asp:LinkButton runat="server" ID="lbnRecover" OnClick="lbnRecover_Click" Visible='<%#Eval("diRowStatus").ToString()=="0"?false:true %>'
                            CommandArgument='<%#Eval("DIID").ToString() %>'>
                            恢复
                        </asp:LinkButton>
                    </td>
                </tr>
            </ItemTemplate>
            <FooterTemplate>
                </table>
            </FooterTemplate>
        </asp:Repeater>
        <cc1:AspNetPager ID="AspNetPager1" Style="float: right" runat="server" PageSize="10"
            AlwaysShow="true" CssClass="paginator" CurrentPageButtonClass="cpb" FirstPageText="首页"
            PagingButtonSpacing="0" LastPageText="尾页" NextPageText="下一页" PrevPageText="上一页"
            OnPageChanged="AspNetPager1_pageChanged">
        </cc1:AspNetPager>
    </div>
    <div id="divAdd" style="display: none;">
        <div class="tc_header">
            <h2>
                编辑子项</h2>
            <a id="hideAdd">
                <img src="../images/chacha.png" width="13" height="13"></a>
        </div>
        <div class="tc_content">
            <div class="tanchu03" style="min-width: 200px; min-height: 80px">
                <table cellpadding="0" cellspacing="5" style="margin: 5px">
                    <tr style="display: none;">
                        <th>
                            子项序号：
                        </th>
                        <td>
                            <input type="text" runat="server" id="txtMDiid" />
                        </td>
                    </tr>
                    <tr>
                        <th>
                            所属类别：
                        </th>
                        <td>
                            <asp:DropDownList runat="server" Style="text-indent: 0px" ID="ddlCat">
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <th>
                            子项名称：
                        </th>
                        <td>
                            <input type="text" runat="server" id="txtName" style="text-indent: 0px" />
                        </td>
                    </tr>
                    <tr>
                        <th>
                            子项描述：
                        </th>
                        <td>
                            <input type="text" runat="server" id="txtDesc" style="text-indent: 0px" />
                        </td>
                    </tr>
                    <tr>
                        <th>
                            子项单位：
                        </th>
                        <td>
                            <input type="text" runat="server" id="txtUnit" style="text-indent: 0px" />
                        </td>
                    </tr>
                    <tr>
                        <th>
                            子项等级：
                        </th>
                        <td>
                            <asp:DropDownList runat="server" ID="ddlItemLevel">
                                <asp:ListItem Text="A" Value="A"></asp:ListItem>
                                <asp:ListItem Text="B" Value="B"></asp:ListItem>
                                <asp:ListItem Text="C" Value="C"></asp:ListItem>
                                <asp:ListItem Text="D" Value="D"></asp:ListItem>
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2" align="center">
                            <asp:Button runat="server" ID="btnAdd" Text="确认" class="MaintenanceButton" OnClick="btnAdd_Click"
                                Style="background: #d91913; outline: none; border: none; color: White; padding: 5px 20px;" />
                        </td>
                    </tr>
                </table>
            </div>
        </div>
    </div>
    <div id="divMsg" style="display: none;">
        <div class="tc_header">
            <h2>
                提示</h2>
            <a id="hideMsg">
                <img src="../images/chacha.png" width="13" height="13"></a>
        </div>
        <div class="tc_content">
            <div class="tanchu03" style="">
                <p id="msgContent">
                </p>
            </div>
        </div>
    </div>
    <script type="text/javascript" src="../Scripts/ItemManage.js"></script>
</asp:Content>
